From bf3215b128a345b5443bc1396d7578d3a0411d88 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Sun, 21 Oct 2018 17:45:38 -0500 Subject: [PATCH] Fix flake8 is None problems --- src/pgwui_core/pgwui_core.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pgwui_core/pgwui_core.py b/src/pgwui_core/pgwui_core.py index 58cd3e1..a538ee0 100644 --- a/src/pgwui_core/pgwui_core.py +++ b/src/pgwui_core/pgwui_core.py @@ -555,7 +555,7 @@ def textualize(st): ''' Return pg representation of NULL for None when string st is None. ''' - return 'NULL' if st == None else st + return 'NULL' if st is None else st def is_checked(val): @@ -726,12 +726,12 @@ class DBError(Error): ''' primary = cgi_escape(ex.diag.message_primary) - if ex.diag.message_detail == None: + if ex.diag.message_detail is None: detail = '' else: detail = '
DETAIL: ' + cgi_escape(ex.diag.message_detail) - if ex.diag.message_hint == None: + if ex.diag.message_hint is None: hint = '' else: hint = '
HINT: ' + cgi_escape(ex.diag.message_hint) @@ -818,7 +818,7 @@ class SQLCommand(object): try: cur.execute(self.stmt, self.args) except psycopg2.DatabaseError as ex: - if self.ec == None: + if self.ec is None: raise ex else: raise self.ec(ex) -- 2.34.1